package edu.sctu.zhoudie.mouth201506.day20150602.Railway;

/**
 * 包裹进站处理
 * Created by user08 on 2015/6/2.
 */
public class PackegeWay {
    private String danger = "易燃易爆,管制刀具,有毒物质,枪械,酒精";
    private PeopleAppbean peopleappbean;

    public PackegeWay(PeopleAppbean peopleappbean) {
        this.peopleappbean = peopleappbean;
    }

    /**
     * 检查包裹
     */
    public boolean checkpackege() {
        boolean is_danger = false;
        if (peopleappbean.isIs_packege()) {
            if (danger.contains(peopleappbean.getPackegename())) {
                is_danger = true;
            }
        } else {
            is_danger = false;
        }
        return is_danger;
    }

    /**
     * 检查水
     */
    public boolean chaWater() {
        boolean is_danger = false;
        if (peopleappbean.isIs_water()) {
            if (danger.contains(peopleappbean.getWatername())) {
                is_danger = true;
            }
        } else {
            is_danger = false;
        }

        return is_danger;
    }


}
